<%@ page import="com.lihuanyu.upcOA.conn.databaseUtil" %>
<%@ page import="java.sql.ResultSet" %>
<%--
  Created by IntelliJ IDEA.
  User: skyADMIN
  Date: 15/9/2
  Time: 下午4:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    int flag = 0;
    int uid = Integer.parseInt(String.valueOf(session.getAttribute("uid")));
    request.setCharacterEncoding("utf-8");
    String name = request.getParameter("name") == null ? "" : new String(request.getParameter("name"));
    String sex = request.getParameter("sex") == null ? "" : new String(request.getParameter("sex"));
    String stuid = request.getParameter("stuid") == null ? "" : new String(request.getParameter("stuid"));
    String major = request.getParameter("major") == null ? "" : new String(request.getParameter("major"));
    String classname = request.getParameter("class") == null ? "" : new String(request.getParameter("class"));
    String email = request.getParameter("email") == null ? "" : new String(request.getParameter("email"));
    String phone = request.getParameter("phone") == null ? "" : new String(request.getParameter("phone"));
    String QQ = request.getParameter("qq") == null ? "" : new String(request.getParameter("qq"));
    databaseUtil db = new databaseUtil();
    String sql = "update student_info set name='" + name + "',sex='" + sex + "',stuid='" + stuid + "',major='" + major + "',class='" + classname + "',qq='" + QQ + "',phonenum='" + phone + "',email='" + email + "' where uid="+uid;
    //System.out.print(sql);
    db.executeUpdate(sql);
    out.print("true");
    db.sqlclose();
%>
